home *** CD-ROM | disk | FTP | other *** search
-
- The ZipCode format
-
- WARNING: The description below is a mere extrapolation from the files and
- program sources I've encountered.
-
- The ZipCode algorithm is used to split and compress disk images and 1541
- disks so that the chunks may fit onto a single 1541 disk. This way even people
- connecting to the Net with Commodore machines can also download, then extract
- and use such disks.
- The algorithm creates four separate files out of one disk. On the PC the base
- name of the ZipCode archives comes from the name of the original disk image.
- The four files are numbered this way: '1!BASE.EXT', ..., '4!BASE.EXT'.
- These files contain the following data:
-
- FILE POSITION DESCRIPTION
- 1!BASE.EXT $0000-$0001 Load address (usually $03FE)
- $0002-$0003 ID of the original disk (not the one in the BAM
- but the one in block headers); in files created
- on the PC its default is the string '64'
- $0004- data of tracks 1-8
-
- 2!BASE.EXT $0000-$0001 Load address (usually $0400)
- $0002- data of tracks 9-16
-
- 3!BASE.EXT $0000-$0001 Load address (usually $0400)
- $0002- data of tracks 17-25
-
- 4!BASE.EXT $0000-$0001 Load address (usually $0400)
- $0002- data of tracks 26-35
-
- Blocks in track data are usually recorded with a 10 block soft sector
- interleave and not sequentially. This way is much faster to compress and
- decompress on a Commodore machine. A block looks like this:
-
- POSITION DESCRIPTION
- $0000 BITS 6-7: Compression mode:
- 00 block data is stored unchanged (byte by byte)
- 01 block is homogeneous (filled by a single byte)
- 10 block data is RLE-compressed
- 11 unused
- BITS 0-5: Track number
- $0001 Sector number
- $0002- Block data
-
- Unchanged block data:
-
- $0002-$0101 Data of the original block (256 bytes)
-
- Homogeneous block data:
-
- $0002 Fill byte (1 byte)
-
- RLE-compressed block data:
-
- $0002 Length of compressed data
- $0003 Mark byte
- $0004-LEN+3 RLE-compressed data (LEN bytes)
- a 'mark byte - repeat count - data byte' byte sequence tells
- that there was a 'repeat count' long sequence of 'data bytes'
- in the original block; sequences shorter than four bytes are
- not compressed
-